"""
Generate random data for testing.
"""

import pandas as pd
import numpy as np

def generate_random_dataframe(num_rows):
    return pd.DataFrame({
            'Id': np.random.randint(1, 100000, num_rows),
            'MSSubClass': np.random.randint(20, 201, size=num_rows),
            'MSZoning': np.random.choice(['RL', 'RM', 'C (all)', 'FV', 'RH'], size=num_rows),
            'LotFrontage': np.random.randint(50, 151, size=num_rows),
            'LotFrontage': np.random.randint(50, 151, size=num_rows),
            'LotArea': np.random.randint(5000, 20001, size=num_rows),
            'Street': np.random.choice(['Pave', 'Grvl'], size=num_rows),
            'Alley': np.random.choice(['NA', 'Grvl', 'Pave'], size=num_rows),
            'LotShape': np.random.choice(['Reg', 'IR1', 'IR2', 'IR3'], size=num_rows),
            'LandContour': np.random.choice(['Lvl', 'Bnk', 'HLS', 'Low'], size=num_rows),
            'Utilities': np.random.choice(['AllPub', 'NoSewr', 'NoSeWa', 'ELO'], size=num_rows),
            'LotConfig': np.random.choice(['Inside', 'Corner', 'CulDSac', 'FR2', 'FR3'], size=num_rows),
            'LandSlope': np.random.choice(['Gtl', 'Mod', 'Sev'], size=num_rows),
            'Neighborhood': np.random.choice(['FakeCity1', 'FakeCity2', 'FakeCity3'], size=num_rows),
            'Condition1': np.random.choice(['Norm', 'Feedr', 'Artery', 'RRNn', 'RRAn', 'PosN', 'PosA', 'RRNe', 'RRAe'], size=num_rows),
            'Condition2': np.random.choice(['Norm', 'Feedr', 'Artery', 'RRNn', 'RRAn', 'PosN', 'PosA', 'RRNe', 'RRAe'], size=num_rows),
            'BldgType': np.random.choice(['1Fam', '2FmCon', 'Duplex', 'TwnhsE', 'Twnhs'], size=num_rows),
            'HouseStyle': np.random.choice(['1Story', '1.5Fin', '1.5Unf', '2Story', '2.5Fin', '2.5Unf', 'SFoyer', 'SLvl'], size=num_rows),
            'OverallQual': np.random.randint(1, 11, size=num_rows),
            'OverallCond': np.random.randint(1, 11, size=num_rows),
            'YearBuilt': np.random.randint(1900, 2022, size=num_rows),
            'YearRemodAdd': np.random.randint(1900, 2022, size=num_rows),
            'RoofStyle': np.random.choice(['Gable', 'Hip', 'Gambrel', 'Mansard', 'Flat', 'Shed'], size=num_rows),
            'RoofMatl': np.random.choice(['CompShg', 'Tar&Grv', 'WdShake', 'WdShngl', 'Metal', 'Membran', 'Roll', 'ClyTile'], size=num_rows),
            'Exterior1st': np.random.choice(['FakeExt1', 'FakeExt2', 'FakeExt3'], size=num_rows),
            'Exterior2nd': np.random.choice(['FakeExt4', 'FakeExt5', 'FakeExt6'], size=num_rows),
            'MasVnrType': np.random.choice(['BrkFace', 'None', 'Stone', 'BrkCmn'], size=num_rows),
            'MasVnrArea': np.random.randint(0, 1001, size=num_rows),
            'ExterQual': np.random.choice(['Ex', 'Gd', 'TA', 'Fa', 'Po'], size=num_rows),
            'ExterCond': np.random.choice(['Ex', 'Gd', 'TA', 'Fa', 'Po'], size=num_rows),
            'Foundation': np.random.choice(['PConc', 'CBlock', 'BrkTil', 'Slab', 'Stone', 'Wood'], size=num_rows),
            'BsmtQual': np.random.choice(['Ex', 'Gd', 'TA', 'Fa', 'Po', 'NA'], size=num_rows),
            'BsmtCond': np.random.choice(['Ex', 'Gd', 'TA', 'Fa', 'Po', 'NA'], size=num_rows),
            'BsmtExposure': np.random.choice(['Gd', 'Av', 'Mn', 'No', 'NA'], size=num_rows),
            'BsmtFinType1': np.random.choice(['GLQ', 'ALQ', 'BLQ', 'Rec', 'LwQ', 'Unf', 'NA'], size=num_rows),
            'BsmtFinSF1': np.random.randint(0, 2001, size=num_rows),
            'BsmtFinType2': np.random.choice(['GLQ', 'ALQ', 'BLQ', 'Rec', 'LwQ', 'Unf', 'NA'], size=num_rows),
            'BsmtFinSF2': np.random.randint(0, 1001, size=num_rows),
            'BsmtUnfSF': np.random.randint(0, 2001, size=num_rows),
            'TotalBsmtSF': np.random.randint(0, 3001, size=num_rows),
            'Heating': np.random.choice(['GasA', 'GasW', 'Grav', 'Wall', 'OthW', 'Floor'], size=num_rows),
            'HeatingQC': np.random.choice(['Ex', 'Gd', 'TA', 'Fa', 'Po'], size=num_rows),
            'CentralAir': np.random.choice(['Y', 'N'], size=num_rows),
            'Electrical': np.random.choice(['SBrkr', 'FuseA', 'FuseF', 'FuseP', 'Mix'], size=num_rows),
            '1stFlrSF': np.random.randint(500, 4001, size=num_rows),
            '2ndFlrSF': np.random.randint(0, 2001, size=num_rows),
            'LowQualFinSF': np.random.randint(0, 201, size=num_rows),
            'GrLivArea': np.random.randint(600, 5001, size=num_rows),
            'BsmtFullBath': np.random.randint(0, 4, size=num_rows),
            'BsmtHalfBath': np.random.randint(0, 3, size=num_rows),
            'FullBath': np.random.randint(0, 5, size=num_rows),
            'HalfBath': np.random.randint(0, 3, size=num_rows),
            'BedroomAbvGr': np.random.randint(0, 11, size=num_rows),
            'KitchenAbvGr': np.random.randint(0, 4, size=num_rows),
            'KitchenQual': np.random.choice(['Ex', 'Gd', 'TA', 'Fa', 'Po'], size=num_rows),
            'TotRmsAbvGrd': np.random.randint(0, 16, size=num_rows),
            'Functional': np.random.choice(['Typ', 'Min1', 'Min2', 'Mod', 'Maj1', 'Maj2', 'Sev', 'Sal'], size=num_rows),
            'Fireplaces': np.random.randint(0, 4, size=num_rows),
            'FireplaceQu': np.random.choice(['Ex', 'Gd', 'TA', 'Fa', 'Po', 'NA'], size=num_rows),
            'GarageType': np.random.choice(['Attchd', 'Detchd', 'BuiltIn', 'CarPort', 'Basment', '2Types', 'NA'], size=num_rows),
            'GarageYrBlt': np.random.randint(1900, 2022, size=num_rows),
            'GarageFinish': np.random.choice(['Fin', 'RFn', 'Unf', 'NA'], size=num_rows),
            'GarageCars': np.random.randint(0, 5, num_rows),
            'GarageArea': np.random.randint(0, 1001, num_rows),
            'GarageQual': np.random.choice(['Ex', 'Gd', 'TA', 'Fa', 'Po', 'NA'], num_rows),
            'GarageCond': np.random.choice(['Ex', 'Gd', 'TA', 'Fa', 'Po', 'NA'], num_rows),
            'PavedDrive': np.random.choice(['Y', 'N', 'P'], num_rows),
            'WoodDeckSF': np.random.randint(0, 501, num_rows),
            'OpenPorchSF': np.random.randint(0, 301, num_rows),
            'EnclosedPorch': np.random.randint(0, 201, num_rows),
            '3SsnPorch': np.random.randint(0, 101, num_rows),
            'ScreenPorch': np.random.randint(0, 201, num_rows),
            'PoolArea': np.random.randint(0, 301, num_rows),
            'PoolQC': np.random.choice(['Ex', 'Gd', 'TA', 'Fa', 'NA'], num_rows),
            'Fence': np.random.choice(['MnPrv', 'GdWo', 'GdPrv', 'MnWw', 'NA'], num_rows),
            'MiscFeature': np.random.choice(['Shed', 'Gar2', 'Othr', 'NA'], num_rows),
            'MiscVal': np.random.randint(0, 5001, num_rows),
            'MoSold': np.random.randint(1, 13, num_rows),
            'YrSold': np.random.randint(2006, 2022, num_rows),
            'SaleType': np.random.choice(['WD', 'CWD', 'VWD', 'New', 'COD', 'Con', 'ConLw', 'ConLI', 'ConLD', 'Oth'], num_rows),
            'SaleCondition': np.random.choice(['Normal', 'Abnorml', 'AdjLand', 'Alloca', 'Family', 'Partial'], num_rows),
            'SalePrice': np.random.randint(50000, 800001, num_rows),
        })

